<div class="hd-20160519">
    <div class="hd-banenr"></div>
    <div class="hd-main-content">
      <div style="height: 55px;">
        <div class="hd-control-block w1100">
          <ul class="block-list clearfloat">
            <li><i></i><a href="#display1">Gadgets hogareños</a></li>
            <li><i></i><a href="#display2">Adventura y deportes</a></li>
            <li><i></i><a href="#display3">Últimos móviles y accesorios</a></li>
            <li><i></i><a href="#display4">Cosas para picnic</a></li>
          </ul>
        </div>
      </div>
      
      <div class="hd-display-block w1100" id="display1">
        <h3>Quedarse en casa puede ser más divertido de lo que crees</h3>
        <div class="hd-product-list">
          <ul class="lis1 lists-14 clearfloat"></ul>
        </div>
      </div>

      <div class="hd-display-block w1100" id="display2">
        <h3>No esperar ni un segundo para explorar la naturaleza</h3>
        <div class="hd-product-list">
          <ul class="lis2 lists-15 clearfloat"></ul>
        </div>
      </div>

      <div class="hd-display-block" id="display3">
        <h3 class="w1100">Siempre está bien informado sobre las últimas tecnologías</h3>
        <div class="hd-product-list w1100">
          <ul class="lis4 lists-16 clearfloat"></ul>
        </div>
      </div>
  
      <div class="hd-display-block" id="display4">
        <h3 class="w1100">¡Será fantástico tomar el sol y respirar aire fresco en algún lugar verde!</h3>
        <div class="hd-product-list w1100 clearfloat">
          <ul class="lis4" style="width: 886px;float: left;">
            <li>
              <a href="#"><img src="./images/2016051922.jpg" alt="Tienda de campaña plegable para niños al aire libre Rosado" width="876" height="370"></a>
            </li>
            <li>
              <a href="#"><img src="./images/2016051923.jpg" alt="Shake N Mini exprimidor de jugo multifuncional" width="433" height="420"></a>
            </li>
            <li>
              <a href="#"><img src="./images/2016051924.jpg" alt="Sofá perezoso saco de dormir infable Verde" width="433" height="420"></a>
            </li>
          </ul>
          <ul class="lis5 lists-17"></ul>
        </div>
      </div>
    </div>
  </div>
  <style>
    .hd-20160519 {background:#f5f5f5;}
    .hd-banenr {height:545px;width: 100%;background: url(./images/201605191.jpg)no-repeat center top;}
    .hd-control-block.fixed {width: 100%;position: fixed;top: 0;left: 0;z-index: 99999;margin-top: 0;background: #ff5206;}
    .block-list li {height: 55px; background: #9DC7F9; float: left; text-align: center; position: relative;width:-webkit-calc((100% - 3px)/4);width:-ms-calc((100% - 3px)/4);width:calc((100% - 3px)/4);width:-moz-calc((100% - 3px)/4);width:-o-calc((100% - 3px)/4);cursor: pointer;border-right: 1px solid #849FBF;}
    .block-list li.current a {color:#fff;background: #e9001a;}
    .block-list li:hover a {color:#fff;background: #333;}
    .block-list li a {font-size: 17px; color: #333; line-height: 55px;display: block;height: 55px;}
    .block-list li:last-child {margin-right: 0px;border-right: none;}
    .block-list li.current i{width: 0;height: 0;border-left: 10px solid transparent;border-right: 10px solid transparent;border-top: 15px solid #e9001a;position: absolute;bottom: -15px;left: 50%;margin-left: -10px;}
      .block-list li:hover i{border-top-color:#333;}
    .hd-display-block {margin-top: 30px;text-align: center;}
    .hd-display-block h3{font-size: 20px;color:#333;font-weight: normal;margin-bottom: 25px;}
    .hd-product-list ul li {float: left;margin: 0 10px 10px 0;background: #fff;overflow: hidden;text-align: center;position: relative;box-shadow: 0px 0px 10px #ccc;}
    .hd-product-list ul li img {display:block;}
    ul li img.product_img {width:100%;margin-top:10px;}
    .hd-product-list ul li:hover img {opacity: 0.6;}
    .hd-product-list ul.lis5 li {margin-right: 0;}
    .hd-product-list .price-area {position: absolute;bottom: 10px;width: 100%;background: rgba(255, 255, 255, 0.8);}
    .hd-product-list .hd-btn-buy { font-size: 14px; color: #e9001a;display: block;text-decoration: underline;}
    .hd-product-list .old-price { font-size: 14px; text-decoration: line-through; margin-right: 10px;}
    .hd-product-list .current-price { font-size: 20px; font-weight: bold; color: #e9001a;}
    .hd-product-list ul li.small-list {width: 215px; height: 265px;}
    .hd-product-list ul li.noraml-list{width: 267px;height: 310px;}
    .hd-product-list ul li.small-small-list {width: 212px;height: 260px;}
    .review-wrapper {position: absolute; background: #FF5F19; bottom: 0px; -webkit-transition: all .2s linear; transition: all .2s linear; -ms-transition: all .2s linear; -o-transition: all .2s linear; -moz-transition: all .2s linear; height: 0; opacity: 0;width: 100%;}
    .hd-product-list .review-wrapper p{padding: 10px;font-size: 14px; margin: 0px;text-align: left;}
    .hd-product-list .review-wrapper .hd-btn-buy {color: #333;float: right;text-decoration: underline;}
    .review-wrapper p a{color:#fff;}
    .hd-product-list ul li:hover .review-wrapper {height: 55px; opacity: 1;}
  </style>
  <script type="text/javascript">
    (function($){
        var str1 = `<li><a href="#"><img src="./images/201605192.jpg" alt="Chuwi iLife V7s Robot de limpieza y aspirador inteligente Rosado"></a></li>`, 
            str2 = '',str2_1 = '', str3 = '',str3_1 = '', str4 = '', str5 = '',str5_1 = '',
            str6 = `style="margin-right: 0;"`, 
            str7Cs = 'small-list',
            str8Cs = 'noraml-list',
            str9Cs = 'small-small-list';
        function formateStr(cStr, mgStr){
          return `<li class="${cStr}" ${mgStr}>
              <a href="#"><img class="product_img" src="./images/2016040616.jpg" alt="Blackview Ultra A6 Plus 2GB 16GB Dorado"></a>
              <div class="price-area">
                <span class="old-price">309.99€</span>
                <span class="current-price">145.99€</span>
                <a href="#" class="hd-btn-buy">Comprar&gt;&gt;</a>
              </div>
              <div class="review-wrapper">
                <p><a href="#">Blackview Ultra A6 Plus 2GB 16GB Dorado</a><a href="#" class="hd-btn-buy">Comprar&gt;&gt;</a></p>
              </div>
            </li>`
        }
        for (var i = 0; i < 3; i++) {
          str5 = formateStr(str7Cs, i == 2 ? str6: '');
          str1 += str5;
          str2_1 += str5;
          str4 += formateStr(str9Cs,'');
        }
        str1 += ` <li style="margin-right: 0;">
              <a href="#"><img src="./images/201605193.jpg" alt="G80 Mini proyector portátil teatro casero Negro" width="665" height="282"></a>
            </li>`;
        for (var i = 0; i < 8; i++) {
          str5_1 = formateStr(str8Cs, (i == 3 || i === 7) ? str6: '');
          str1 += str5_1;
          str3_1 += str5_1;
        }
        $(".lists-14").append(str1);


        str2 +=  formateStr(str7Cs, '') +
                `<li><a href="#"><img src="./images/201605198.jpg" alt="Palo de selfie con espejo retrovisor para móviles del color caramelo Naranja" width="650" height="265"></a>
                </li>` + 
                formateStr(str7Cs, str6) +
                `<li><a href="#"><img src="./images/2016051912.jpg" alt="Haier Hierro V1 Reloj inteligente con ritmo cardíaco impermeable Negro"></a></li>
                <li style="margin-right: 0;"><a href="#"><img src="./images/2016051913.jpg" alt="Xiaomi Amazfit MOONBEAN Rayo de luna Pulsera deportiva"></a></li>`;
        for (var i = 0; i < 4; i++) {
          str2 += formateStr(str8Cs, i == 3 ? str6: '');
        }
        str2 += `<li ><a href="#"><img src="./images/2016051914.jpg" alt="Geekvida báscula para Android iOS dispositivos Negro"></a></li>` + str2_1;
        $(".lists-15").append(str2);

         str3 +=  `<li><a href="#"><img src="./images/2016051915.jpg" alt="Xiaomi Mi Max 3GB 32GB 6.44'' 4850mAh Dorado" width="630" height="313"></a></li>
                  <li><a href="#"><img src="./images/2016051916.jpg" alt="Xiaomi Redmi 3 Pro 3GB 32GB Plata" width="630" height="313"></a></li>
                  <li style="margin-right: 0;margin-top: -323px;"><a href="#"><img src="./images/2016051917.jpg" alt="Xiaomi Redmi Note 3 Pro 3GB 32GB Gris" width="460" height="636"></a></li> `
                  + str3_1;
        for (var i = 0; i < 5; i++) {
          str3 += formateStr(str9Cs, i == 4 ? str6: '');
        }
        $(".lists-16").append(str3);

        $(".lists-17").append(str4);
        var sideNav = $(".hd-control-block");
        $(window).on("scroll",function(){
          var sideNavShow = $("#display1").offset().top - 120;
          var modTop = [];
          if($(this).scrollTop()>=sideNavShow){

            sideNav.addClass("fixed");
          }
          else{
            sideNav.removeClass("fixed");
            sideNav.find("li").removeClass("current");
          }

          /*滚动到哪个地方，相应的对方变换样式*/
          for (var i = 0; i < $(".hd-control-block .block-list li").length; i++) {
            modTop[i] = $($(".hd-control-block .block-list li a").eq(i).attr("href")).offset().top -125;

            if ($(window).scrollTop() >= modTop[i]) {
              $(".hd-control-block .block-list li").removeClass('current').eq(i).addClass('current');
            };
          };
        });
        
        sideNav.find("li").find("a").on("click",function(e){
          e.preventDefault();
          var aHash = this.hash;
          $("html,body").animate({
            scrollTop: aHash=="#Top" ? 0 : $(aHash).offset().top -120
          });
        });
    })(jQuery);
  </script>